import React, { Component } from 'react'

import PropTypes from 'prop-types'

export default class Header extends Component {
    static defaultProps = {//设置属性默认值
        title:'默认标题'
    }
    static propTypes = {//设置属性类型验证
        title: PropTypes.string
    }
    render() {
        return (
            <div className={`header ${this.props.theme === 'light'?'light':''}`} >
                <span>{this.props.back}</span>
                <span>{this.props.title}</span>
                <span>{this.props.ope}</span>
            </div>
        )
    }
}
